home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form OcxMainForm
- BorderStyle = 3 'Fixed Dialog
- Caption = "Mail eXtension Win95 DEMO OCX-32"
- ClientHeight = 5160
- ClientLeft = 1500
- ClientTop = 1560
- ClientWidth = 6615
- Height = 5535
- Left = 1455
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5160
- ScaleWidth = 6615
- Top = 1230
- Width = 6705
- Begin Mailx16Lib.MForm MForm1
- Left = 1920
- Top = 4680
- _Version = 65541
- _ExtentX = 3413
- _ExtentY = 500
- _StockProps = 0
- MXFormName = "FormTag1"
- End
- Begin Mailx16Lib.MSess MSess1
- Left = 0
- Top = 4320
- _Version = 65541
- _ExtentX = 900
- _ExtentY = 900
- _StockProps = 0
- Mail_Type = 2
- DisplayErrors = 0 'False
- End
- Begin Threed.SSPanel SSPanel1
- Height = 855
- Left = 0
- TabIndex = 1
- Top = 0
- Width = 6615
- _Version = 65536
- _ExtentX = 11668
- _ExtentY = 1508
- _StockProps = 15
- BackColor = 12632256
- Outline = -1 'True
- Begin ComctlLib.Toolbar Toolbar1
- Height = 630
- Left = 120
- Negotiate = -1 'True
- TabIndex = 2
- Top = 120
- Width = 6375
- _Version = 65536
- _ExtentX = 11245
- _ExtentY = 1111
- _StockProps = 96
- ImageList = "ImageList1"
- ButtonWidth = 1032
- ButtonHeight = 1005
- NumButtons = 8
- i1 = "ocxma95.frx":0000
- i2 = "ocxma95.frx":01C7
- i3 = "ocxma95.frx":0366
- i4 = "ocxma95.frx":0521
- i5 = "ocxma95.frx":06C4
- i6 = "ocxma95.frx":086F
- i7 = "ocxma95.frx":0A16
- i8 = "ocxma95.frx":0BB5
- AlignSet = -1 'True
- End
- End
- Begin Mailx16Lib.MMsg MMsg1
- Left = 0
- Top = 3720
- _Version = 65541
- _ExtentX = 900
- _ExtentY = 900
- _StockProps = 0
- MarkAsRead = 0 'False
- DisplayErrors = 0 'False
- BindString = "MSess1"
- End
- Begin Mailx16Lib.MReci MReci1
- Left = 5400
- Top = 4440
- _Version = 65541
- _ExtentX = 900
- _ExtentY = 900
- _StockProps = 0
- DisplayErrors = 0 'False
- BindString = "MMsg2"
- End
- Begin Mailx16Lib.MFile MFile1
- Left = 6000
- Top = 4440
- _Version = 65541
- _ExtentX = 900
- _ExtentY = 900
- _StockProps = 0
- BindString = "MMsg2"
- End
- Begin Mailx16Lib.MMsg MMsg2
- Left = 4800
- Top = 4440
- _Version = 65541
- _ExtentX = 900
- _ExtentY = 900
- _StockProps = 0
- SuppressAttach = 0 'False
- DisplayErrors = 0 'False
- BindString = "MSess1"
- End
- Begin TabDlg.SSTab SSTab1
- Height = 3735
- Left = 120
- TabIndex = 3
- Top = 960
- Width = 6375
- _Version = 65536
- _ExtentX = 11245
- _ExtentY = 6588
- _StockProps = 15
- Caption = "Recipients"
- TabsPerRow = 4
- Tab = 1
- TabOrientation = 0
- Tabs = 4
- Style = 1
- TabMaxWidth = 0
- TabHeight = 529
- TabCaption(0) = "Container Messages"
- Tab(0).ControlCount= 4
- Tab(0).ControlEnabled= 0 'False
- Tab(0).Control(0)= "SSPanel2"
- Tab(0).Control(1)= "TreeView1"
- Tab(0).Control(2)= "nInbox"
- Tab(0).Control(3)= "Label2"
- TabCaption(1) = "Recipients"
- Tab(1).ControlCount= 7
- Tab(1).ControlEnabled= -1 'True
- Tab(1).Control(0)= "Label4"
- Tab(1).Control(1)= "Label5"
- Tab(1).Control(2)= "SSCommand2"
- Tab(1).Control(3)= "SSCommand3"
- Tab(1).Control(4)= "SSCommand4"
- Tab(1).Control(5)= "ListView3"
- Tab(1).Control(6)= "szResolve"
- TabCaption(2) = "File Attachments"
- Tab(2).ControlCount= 3
- Tab(2).ControlEnabled= 0 'False
- Tab(2).Control(0)= "szFiles"
- Tab(2).Control(1)= "Label6"
- Tab(2).Control(2)= "ListView2"
- TabCaption(3) = "Message"
- Tab(3).ControlCount= 10
- Tab(3).ControlEnabled= 0 'False
- Tab(3).Control(0)= "szFrom"
- Tab(3).Control(1)= "szTime"
- Tab(3).Control(2)= "szSubject"
- Tab(3).Control(3)= "Frame1"
- Tab(3).Control(4)= "Label7"
- Tab(3).Control(5)= "Label3"
- Tab(3).Control(6)= "SSCommand6"
- Tab(3).Control(7)= "SSCommand5"
- Tab(3).Control(8)= "Label1"
- Tab(3).Control(9)= "SSCommand1"
- Begin VB.TextBox szFrom
- Height = 285
- Left = -74040
- TabIndex = 27
- Top = 1200
- Width = 3975
- End
- Begin VB.TextBox szTime
- Height = 285
- Left = -74040
- TabIndex = 26
- Top = 840
- Width = 3975
- End
- Begin VB.TextBox szSubject
- Height = 285
- Left = -74040
- TabIndex = 14
- Top = 480
- Width = 3975
- End
- Begin VB.TextBox szResolve
- Height = 285
- Left = 1440
- TabIndex = 8
- Top = 480
- Width = 3375
- End
- Begin Threed.SSPanel SSPanel2
- Height = 375
- Left = -72480
- TabIndex = 20
- Top = 3210
- Width = 3735
- _Version = 65536
- _ExtentX = 6588
- _ExtentY = 661
- _StockProps = 15
- BackColor = 12632256
- BevelOuter = 1
- Begin ComctlLib.ProgressBar ProgressBar1
- Height = 270
- Left = 45
- TabIndex = 21
- Top = 45
- Width = 3645
- _Version = 65536
- _ExtentX = 6429
- _ExtentY = 476
- _StockProps = 192
- Appearance = 1
- End
- End
- Begin VB.Frame Frame1
- Caption = "Note Part:"
- Height = 1815
- Left = -74880
- TabIndex = 22
- Top = 1680
- Width = 4815
- Begin RichtextLib.RichTextBox szNoteText
- Height = 1455
- Left = 120
- TabIndex = 23
- Top = 240
- Width = 4575
- _Version = 65536
- _ExtentX = 8070
- _ExtentY = 2566
- _StockProps = 69
- BackColor = -2147483643
- TextRTF = $"ocxma95.frx":0D60
- RightMargin = 4555.17
- End
- End
- Begin ComctlLib.TreeView TreeView1
- Height = 2655
- Left = -74880
- TabIndex = 29
- Top = 480
- Width = 6135
- _Version = 65536
- _ExtentX = 10821
- _ExtentY = 4683
- _StockProps = 196
- Appearance = 1
- BorderStyle = 1
- HideSelection = 0 'False
- ImageList = "ImageList2"
- Indentation = 529
- LabelEdit = 1
- LineStyle = 1
- PathSeparator = "\"
- Sorted = -1 'True
- Style = 7
- End
- Begin ComctlLib.ListView ListView3
- Height = 2415
- Left = 120
- TabIndex = 28
- Top = 1200
- Width = 4695
- _Version = 65536
- _ExtentX = 8281
- _ExtentY = 4260
- _StockProps = 205
- ForeColor = -2147483640
- BackColor = -2147483643
- Appearance = 1
- BorderStyle = 1
- HideSelection = 0 'False
- Icons = "ImageList1"
- LabelEdit = 1
- SmallIcons = ""
- End
- Begin VB.Label Label7
- Alignment = 1 'Right Justify
- Caption = "From:"
- Height = 255
- Left = -74880
- TabIndex = 25
- Top = 1200
- Width = 700
- End
- Begin VB.Label Label3
- Alignment = 1 'Right Justify
- Caption = "Time:"
- Height = 255
- Left = -74880
- TabIndex = 24
- Top = 840
- Width = 700
- End
- Begin Threed.SSCommand SSCommand6
- Height = 855
- Left = -69840
- TabIndex = 19
- Top = 1560
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 1508
- _StockProps = 78
- Caption = "Forward"
- Picture = "ocxma95.frx":0E43
- End
- Begin Threed.SSCommand SSCommand5
- Height = 855
- Left = -69840
- TabIndex = 18
- Top = 2640
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 1508
- _StockProps = 78
- Caption = "New Msg"
- Picture = "ocxma95.frx":1295
- End
- Begin VB.Label szFiles
- Caption = "0"
- Height = 255
- Left = -73320
- TabIndex = 17
- Top = 3360
- Width = 1815
- End
- Begin VB.Label Label1
- Alignment = 1 'Right Justify
- Caption = "Subject:"
- Height = 255
- Left = -74880
- TabIndex = 16
- Top = 480
- Width = 700
- End
- Begin Threed.SSCommand SSCommand1
- Height = 855
- Left = -69840
- TabIndex = 15
- Top = 480
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 1508
- _StockProps = 78
- Caption = "Reply"
- Font3D = 3
- Picture = "ocxma95.frx":16E7
- End
- Begin VB.Label Label6
- Caption = "Total Files included:"
- Height = 255
- Left = -74880
- TabIndex = 13
- Top = 3360
- Width = 1455
- End
- Begin ComctlLib.ListView ListView2
- Height = 2775
- Left = -74880
- TabIndex = 12
- Top = 480
- Width = 6135
- _Version = 65536
- _ExtentX = 10821
- _ExtentY = 4895
- _StockProps = 205
- ForeColor = -2147483640
- BackColor = -2147483643
- Appearance = 1
- BorderStyle = 1
- Icons = ""
- LabelEdit = 1
- SmallIcons = ""
- View = 3
- NumItems = 3
- i1 = "ocxma95.frx":1B39
- i2 = "ocxma95.frx":1BE9
- i3 = "ocxma95.frx":1C97
- End
- Begin Threed.SSCommand SSCommand4
- Height = 975
- Left = 4920
- TabIndex = 11
- Top = 1500
- Width = 1335
- _Version = 65536
- _ExtentX = 2355
- _ExtentY = 1720
- _StockProps = 78
- Caption = "Add Recipients"
- Picture = "ocxma95.frx":1D45
- End
- Begin Threed.SSCommand SSCommand3
- Height = 975
- Left = 4920
- TabIndex = 10
- Top = 420
- Width = 1335
- _Version = 65536
- _ExtentX = 2355
- _ExtentY = 1720
- _StockProps = 78
- Caption = "Resolve Names"
- Picture = "ocxma95.frx":2197
- End
- Begin Threed.SSCommand SSCommand2
- Height = 975
- Left = 4920
- TabIndex = 9
- Top = 2580
- Width = 1335
- _Version = 65536
- _ExtentX = 2355
- _ExtentY = 1720
- _StockProps = 78
- Caption = "Address Book"
- Picture = "ocxma95.frx":25E9
- End
- Begin VB.Label Label5
- Caption = "Resolve Names:"
- Height = 255
- Left = 120
- TabIndex = 7
- Top = 540
- Width = 1215
- End
- Begin VB.Label Label4
- Caption = "Current Recipient List:"
- Height = 255
- Left = 120
- TabIndex = 6
- Top = 900
- Width = 1695
- End
- Begin VB.Label nInbox
- Caption = "0"
- Height = 255
- Left = -72960
- TabIndex = 5
- Top = 3360
- Width = 855
- End
- Begin VB.Label Label2
- Caption = "Total Inbox Messages:"
- Height = 255
- Left = -74760
- TabIndex = 4
- Top = 3360
- Width = 1695
- End
- End
- Begin ComctlLib.ImageList ImageList2
- Left = 0
- Top = 840
- _Version = 65536
- _ExtentX = 1005
- _ExtentY = 1005
- _StockProps = 1
- BackColor = -2147483643
- ImageWidth = 32
- ImageHeight = 32
- NumImages = 4
- i1 = "ocxma95.frx":2A3B
- i2 = "ocxma95.frx":2F32
- i3 = "ocxma95.frx":3429
- i4 = "ocxma95.frx":3920
- End
- Begin ComctlLib.ImageList ImageList1
- Left = 6000
- Top = 840
- _Version = 65536
- _ExtentX = 1005
- _ExtentY = 1005
- _StockProps = 1
- BackColor = -2147483643
- ImageWidth = 32
- ImageHeight = 32
- NumImages = 8
- i1 = "ocxma95.frx":3E17
- i2 = "ocxma95.frx":430E
- i3 = "ocxma95.frx":4805
- i4 = "ocxma95.frx":4CFC
- i5 = "ocxma95.frx":51F3
- i6 = "ocxma95.frx":56EA
- i7 = "ocxma95.frx":5BE1
- i8 = "ocxma95.frx":60D8
- End
- Begin ComctlLib.StatusBar StatusBar1
- Align = 2 'Align Bottom
- Height = 300
- Left = 0
- TabIndex = 0
- Top = 4860
- Width = 6615
- _Version = 65536
- _ExtentX = 11668
- _ExtentY = 529
- _StockProps = 68
- AlignSet = -1 'True
- Style = 1
- SimpleText = "Mail eXtension Session CLOSED"
- i1 = "ocxma95.frx":65CF
- End
- Attribute VB_Name = "OcxMainForm"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub TabStrip1_Click()
- End Sub
- Private Sub RichTextBox1_Click()
- End Sub
- Private Sub ListView3_DblClick()
- Dim ItemX As ListItem
- On Error GoTo NoItem
- Set ItemX = ListView3.SelectedItem
- OcxMainForm.MousePointer = 11
- ReciID = ItemX.Key
- ReciNum = Mid$(ReciID, 2)
- nReci = Val(ReciNum)
- MReci1.RecipientNum = nReci
- OcxMainForm.MousePointer = 1
- ' Display Details
- MReci1.Action = ACTION_DETAILS
- NoItem:
- OcxMainForm.MousePointer = 1
- End Sub
- Private Sub SSCommand1_Click()
- If IsActiveSession = True Then
- MMsg2.Action = ACTION_REPLY
- MMsg2.Action = ACTION_SENDMSG
- If MMsg2.ErrorNum <> 0 Then
- MsgBox "Unable to Send Message", 64, "Mail eXtension v1.50"
- End If
- End If
- End Sub
- Private Sub SSCommand2_Click()
- If IsActiveSession = True Then
- MReci1.Action = ACTION_ADDRESS
- Refresh_Recipient
- End If
- End Sub
- Private Sub SSCommand3_Click()
- If IsActiveSession = True Then
- MReci1.ResolveName = szResolve
- szResolve = MReci1.ResolveName
- End If
- End Sub
- Private Sub SSCommand4_Click()
- If IsActiveSession = True Then
- MReci1.Action = ACTION_ADDRECIPIENT
- Refresh_Recipient
- End If
- End Sub
- Private Sub SSCommand5_Click()
- If IsActiveSession = True Then
- MMsg2.Action = ACTION_NEW
- MMsg2.Action = ACTION_SENDMSG
- If MMsg2.ErrorNum <> 0 Then
- MsgBox "Unable to Send Message", 64, "Mail eXtension v1.50"
- End If
- End If
- End Sub
- Private Sub SSCommand6_Click()
- If IsActiveSession = True Then
- MMsg2.Action = ACTION_FORWARD
- MMsg2.Action = ACTION_SENDMSG
- If MMsg2.ErrorNum <> 0 Then
- MsgBox "Unable to Send Message", 64, "Mail eXtension v1.50"
- End If
- End If
- End Sub
- Private Sub Toolbar1_ButtonClick(ByVal Button As Button)
- Dim OpenForms
- Select Case Button.Tag
- Case 1
- LoginMailSystem
- If MSess1.Logon = False Then
- TreeView1.Nodes.Clear
- ListView2.ListItems.Clear
- End If
- Case 2
- OcxMainForm.MousePointer = 11
- SSTab1.Tab = 0
- OpenForms = DoEvents()
- If IsActiveSession = True Then Refresh_Inbox
- OcxMainForm.MousePointer = 1
- Case 3
- OcxMainForm.MousePointer = 11
- SSTab1.Tab = 3
- OpenForms = DoEvents()
- OcxMainForm.MousePointer = 1
- Case 4
- OcxMainForm.MousePointer = 11
- SSTab1.Tab = 1
- OpenForms = DoEvents()
- OcxMainForm.MousePointer = 1
- Case 5
- OcxMainForm.MousePointer = 11
- SSTab1.Tab = 2
- OpenForms = DoEvents()
- OcxMainForm.MousePointer = 1
- Case 6
- If IsActiveSession = True Then
- OcxPassword.Show 1
- End If
- End Select
- End Sub
- Public Sub UpdateStatusBar()
- If MSess1.Logon = True Then
- StatusBar1.SimpleText = "Mail eXtension: Active Session. Current PostOffice=" + MSess1.POPath
- Else
- StatusBar1.SimpleText = "Mail eXtension Session Closed"
- End If
- End Sub
- Public Function IsActiveSession() As Boolean
- If MSess1.Logon = True Then
- IsActiveSession = True
- Else
- IsActiveSession = False
- MsgBox "No active Session available", 64, "Mail eXtension Win 95 DEMO 32"
- End If
- End Function
- Public Sub Refresh_Inbox()
- OcxMainForm.MousePointer = 11
- nMsgCount = MMsg1.MsgCount
- nInbox = nMsgCount
- TreeView1.Nodes.Clear
- If nMsgCount <> 0 Then
- ProgressBar1.Value = 0
- ProgressBar1.Max = nMsgCount
- ' Clear The List View Content
- Dim TreeNode As Node
- Set TreeNode = TreeView1.Nodes.Add(, , "Inbox", "Inbox", 1)
- ' Add the Message List
- MMsg1.Action = ACTION_FINDFIRST
- Do
- If MMsg1.FetchMsg <> 0 Then
- ProgressBar1.Value = ProgressBar1.Value + 1
- If MMsg1.UnreadMsg = True Then
- Set TreeNode = TreeView1.Nodes.Add("Inbox", 4, MMsg1.MsgID, MMsg1.Subject, 3)
- Else
- Set TreeNode = TreeView1.Nodes.Add("Inbox", 4, MMsg1.MsgID, MMsg1.Subject, 4)
- End If
- MMsg1.Action = ACTION_FINDNEXT
- End If
- Loop While MMsg1.FetchMsg <> 0
- ProgressBar1.Value = 0
- End If
- OcxMainForm.MousePointer = 1
- End Sub
- Public Sub Refresh_FileList()
- nFileCount = MFile1.FileCount
- szFiles = nFileCount
- ListView2.ListItems.Clear
- If nFileCount <> 0 Then
- ' Add the File List
- For nCurFile = 1 To nFileCount
- MFile1.FileNum = nCurFile
- Dim Item As ListItem
- Set Item = ListView2.ListItems.Add(, , MFile1.filename, 0)
- Item.SubItems(1) = MFile1.FilePath
- Item.SubItems(2) = Str$(nCurFile)
- Next nCurFile
- End If
- End Sub
- Public Sub LoginMailSystem()
- MSess1.Logon = True
- UpdateStatusBar
- If IsActiveSession = True Then
- SSTab1.Tab = 0
- OpenForms = DoEvents()
- Refresh_Inbox
- End If
- End Sub
- Public Sub Refresh_Recipient()
- nReciCount = MReci1.RecipientCount
- ListView3.ListItems.Clear
- If nReciCount <> 0 Then
- ' Add the Message List
- For nCurReci = 1 To nReciCount
- MReci1.RecipientNum = nCurReci
- Dim Item As ListItem
- Set Item = ListView3.ListItems.Add(, "R" + Str$(nCurReci), MReci1.RecipientName, 8)
- Next
- End If
- End Sub
- Private Sub TreeView1_Collapse(ByVal Node As Node)
- If Node.Image = 2 Then
- Node.Image = 1
- End If
- End Sub
- Private Sub TreeView1_DblClick()
- Dim ItemX As Node
- Dim RootX As Node
- Dim ParentX As Node
- On Error GoTo NoItem
- Set ItemX = TreeView1.SelectedItem
- Set ParentX = ItemX.Parent
- Set RootX = ParentX.Parent
- OcxMainForm.MousePointer = 11
- MMsg2.MsgID = ItemX.Key
- ' Mark Message Image as UNREAD
- If ItemX.Image <> 4 Then ItemX.Image = 4
- If MMsg2.ErrorNum = 0 Then
- szSubject = MMsg2.Subject
- szNoteText = MMsg2.NoteText
- szTime = MMsg2.TimeReceived
- MReci1.FetchType = 0
- MReci1 = MMsg2
- szFrom = MReci1.RecipientName
- MFile1 = MMsg2
- Refresh_FileList
- Refresh_Recipient
- ' Set Current TAB'
- SSTab1.Tab = 3 '
- End If
- NoItem:
- OcxMainForm.MousePointer = 1
- End Sub
- Private Sub TreeView1_Expand(ByVal Node As Node)
- If Node.Image = 1 Then
- Node.Image = 2
- End If
- End Sub
-